/**
 * Created by Daniel on 7/22/16.
 */

import alt from '../alt';
import Config from '../config';

class HomeActions {

    constructor() {
        this.generateActions(
            'getRequireListSuccess',
            'getRequireListFail'
        );
    }

    getRequireList(){

        $.ajax({
            type:'get',
            url:Config.DOMAIN + 'app/require/list',
            dataType:"jsonp",
            jsonpCallback:"flightHandler",
            success:(data) => {
                console.log(data);
                // this.actions.getRequireListSuccess(data.data);
            },
            error:(err) => {
                this.actions.getRequireListFail(err.msg);
            }
        });
    }
}

export default alt.createActions(HomeActions);